package io.terminus.paas.profiler.service

import io.terminus.paas.profiler.model.Route

/**
 * Created by gengrong on 16/3/15.
 * 提供服务调用规则相关操作
 *
 * @see Route
 */
interface RouteService {

    /**
     * 查询某服务的所有规则
     * @param serviceId 服务ID
     * @return 匹配的规则列表
     */
    fun findByServiceId(registryAddress: String, serviceId: String): List<Route>

    open fun createRoute(registryAddress: String, route: Route)
    open fun updateRoute(registryAddress: String, route: Route)
    open fun deleteRoute(registryAddress: String, id: Long)
}